Machine Learning with R Cookbook by Unknown
Author:Unknown
Language: eng
Format: mobi, epub
Publisher: Packt Publishing
How to do it...
Perform the following steps to train the neural network with nnet:
First, install and load the nnet package: > install.packages("nnet") > library(nnet)
Next, split the dataset into training and testing datasets: > data(iris) > set.seed(2) > ind = sample(2, nrow(iris), replace = TRUE, prob=c(0.7, 0.3)) > trainset = iris[ind == 1,] > testset = iris[ind == 2,]
Then, train the neural network with nnet: > iris.nn = nnet(Species ~ ., data = trainset, size = 2, rang = 0.1, decay = 5e-4, maxit = 200) # weights: 19 initial value 165.086674 iter 10 value 70.447976 iter 20 value 69.667465 iter 30 value 69.505739 iter 40 value 21.588943 iter 50 value 8.691760 iter 60 value 8.521214 iter 70 value 8.138961 iter 80 value 7.291365 iter 90 value 7.039209 iter 100 value 6.570987 iter 110 value 6.355346 iter 120 value 6.345511 iter 130 value 6.340208 iter 140 value 6.337271 iter 150 value 6.334285 iter 160 value 6.333792 iter 170 value 6.333578 iter 180 value 6.333498 final value 6.333471 converged
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8303)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6754)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6730)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6612)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6395)
Driving Data Quality with Data Contracts by Andrew Jones(6341)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6104)
Learning SQL by Alan Beaulieu(5997)
Weapons of Math Destruction by Cathy O'Neil(5783)
Big Data Analysis with Python by Ivan Marin(5371)
Data Engineering with dbt by Roberto Zagni(4370)
Solidity Programming Essentials by Ritesh Modi(4020)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3878)
Pandas Cookbook by Theodore Petrou(3586)
Blockchain Basics by Daniel Drescher(3298)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2909)
Feature Store for Machine Learning by Jayanth Kumar M J(2816)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2798)
Mastering Python for Finance by Unknown(2745)
